Skip to content

Deadlines: certificate expiry, CRA Article 14 and BOD 22-01 clocks - #138

Merged
Darknode-Official merged 3 commits into
mainfrom
feat/deadlines
Nov 26, 2026
Merged

Darknode-Official merged 3 commits into
mainfrom
feat/deadlines

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

Stacked on #137 (feat/watch-default). Do not merge before it.

What

A single deadline model, stored per workspace in the monitor Durable Object next to the monitors (dl:<id>, cra:<CVE>, dlSettings). The rules are pure code in public/js/core/deadlines.js, which both the Worker and the Deck import.

Kind When it is created Due Plan
cert-expiry A cert-expiry monitor sees a certificate expiring (the Free watch counts) When the certificate expires Free
cra-exploited CRA opt-in is on, it is on or after 11 Sept 2026, a KEV/EPSS monitor reports a new CISA KEV match (kev: true), and the CVE is in an asset marked "shipped in a product" Early warning: 24h after becoming aware. Notification: 72h after becoming aware. Final report: 14 days after the fix is marked available Pro (KEV/EPSS monitor)
kev-due BOD 22-01 opt-in is on and a KEV/EPSS monitor reports a new KEV match The KEV dueDate, 23:59:59 UTC Pro
  • Became aware starts as the time Darknode alerted. The user can correct it, but not to a time in the future or more than 365 days before the alert.
  • Final report clock starts only when the fix is marked available. Clearing the fix also clears that clock and its alerts.
  • Source text. The clock text quotes Regulation (EU) 2024/2847, Article 14(2). Notifications go to the coordinating CSIRT and ENISA through the single reporting platform.
  • What Darknode does not do. It does not decide whether the CRA applies to a customer, and it submits nothing. That disclaimer appears in the UI, the facts export, the emails, the FAQ and the Terms.

Alerts

  • Where they go. Deadline alerts go to the source monitor's channels. They are sent when a clock starts and when a quarter of its time is left. If both are due in the same pass, they go out as one alert.
  • Certificates.
    • The monitor's first alert is the deadline's "created" alert, so there is no second email.
    • The high-to-critical re-alert at 7 days is folded into one reminder at 25% time left.
    • A certificate deadline closes itself when the monitor no longer sees that certificate.
    • Deleting the monitor dismisses it.
  • Email limit: exempt, with its own cap.
    • CRA deadline emails do not count against the 5 a day. They have a separate counter (deadline-email:<uid>) capped at 20 a day as a flood guard.
    • Certificate and BOD reminders share the normal 5 a day.
    • A capped reminder is logged and marked not sent. It is not retried.
  • Quiet hours and digest.
    • CRA alerts ignore digest and quiet hours.
    • Other deadline alerts respect them: they are held until quiet hours end, or not sent when the monitor is in digest mode.
  • No alert at all when the source monitor is paused or deleted, or its plan has lapsed.

Deck

  • Deadlines page.
    • Soonest first, with a countdown. Overdue deadlines are shown in red.
    • Each deadline has steps and a quoted source. It can be marked done or dismissed, with a required reason (in-app dialog), and closed ones can be reopened.
    • A CRA case shows as one card with a "Copy early-warning facts" panel and a case editor (became aware, fix available, Member States validated against EU27, measures).
    • The opt-ins and the "Shipped in a product" picker (Security Graph assets and software, including SBOM imports) are on this page.
  • Overview block. It shows up to 5 open deadlines and is hidden when nothing is open.
  • Plans. Free users see the opt-ins disabled with a Plans note. The server refuses to enable them below Pro (402).

Copy

  • The docs changelog and FAQ are updated, with a new FAQ entry on Deadlines and the CRA.
  • The Privacy item "Deadlines" is added.
  • Terms: section 3 gets a paragraph and section 14 a bullet. The "What changed" item is folded into TOS 2026-11-25, without a version bump.
  • The Pro plan lines on the landing page and in the Deck are updated.

Verification

  • npm test: 5156 passed, 0 failed. This includes the new test/worker/deadlines.test.mjs, which has 34 tests covering:
    • clock maths;
    • opt-in gating;
    • creation from a KEV event only for shipped assets;
    • certificate creation and closing;
    • the alert schedule;
    • the separate CRA email cap;
    • the plan route (402);
    • the facts export;
    • the email content.
  • npm run release:check: READY (with a warning that the Worker changed).
  • Playwright against a local dist build (port 5064), with the monitor client stubbed by the real core/deadlines.js rules:
    • Covered at 1440 and 390, on Pro and on Free: the Overview block, the Deadlines page, the facts panel, case edits (Member States, measures, fix available starting the 14-day clock), and mark done through the dialog.
    • No console errors and no horizontal overflow.
  • The CSS prefix is ddl-, because dl- is already used by the Downloads page styles.

Deploy notes

  • Worker deploy needed (worker/monitor.js, worker/alert-email.js, worker/checks.js, and the shared public/js/core/deadlines.js). Deploy to staging first. Hosting deploy is needed too.
  • No new secrets, bindings or migrations. The new keys live in the existing MonitorDO storage, and storage.list({ prefix }) is used.

…locks

One deadline model, stored per workspace in the monitor Durable Object
(dl:<id>, cra:<CVE>, dlSettings), with the pure rules in
public/js/core/deadlines.js shared by the Worker and the Deck.

- cert-expiry: from the cert monitor (Free watch included), due when the
  certificate expires; closes itself when the monitor no longer sees it.
  The monitor's first alert is its created alert and the 7-day re-alert
  is replaced by one reminder when a quarter of the time is left.
- cra-exploited: only with the CRA opt-in, from Article 14(2) applying
  (11 Sept 2026), for a CISA KEV match in an asset marked as shipped in
  a product: early warning 24h and notification 72h after becoming
  aware (starts at the alert, user can correct it), final report 14
  days after the fix is marked available.
- kev-due: only with the BOD 22-01 opt-in; the KEV dueDate, end of day UTC.

Alerts go to the source monitor's channels when a clock starts and when
a quarter of its time is left. CRA alert emails have their own 20 a day
limit instead of the 5 a day; certificate and BOD reminders share the 5.
The opt-ins need Pro on the server (402 below it).

Deck: Deadlines page (steps, sources, mark done or dismiss with a
reason, case editor, Copy early-warning facts) and an Overview block.
Docs FAQ, changelog, Privacy and Terms updated within TOS 2026-11-25.
@Darknode-Official
Darknode-Official changed the base branch from feat/watch-default to main November 26, 2026 03:02
@Darknode-Official
Darknode-Official merged commit 063793d into main Nov 26, 2026
10 checks passed
@Darknode-Official
Darknode-Official deleted the feat/deadlines branch November 26, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant